package com.guguskins.back.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.guguskins.back.entity.GuAdminUser;
import com.guguskins.back.entity.vo.PageVo;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author mybatis-plus
 * @since 2021-07-16
 */
public interface GuAdminUserService extends IService<GuAdminUser> {
    GuAdminUser findByName(String userName);

    GuAdminUser selectByUsername(String username);



    int add(GuAdminUser adminUser);

    int edit(GuAdminUser adminUser);

    boolean changeRole(Integer adminId, Integer roleId);

    int updateStatus(Integer[] ids, int status);

    PageVo<GuAdminUser> getPage(int p, int size, String username);

    GuAdminUser getDetail(Integer id);

    /**
     * 判断用户是否系统管理员
     *
     * @param userId
     * @return
     */
    boolean isSysAdmin(Integer userId);

    int changePassword(GuAdminUser adminUser);
}
